#include "smelter_monochrome.h"
#include "helper.h"
#include "debug.h"
typedef struct
{
    Helper_EaseInEaseOut_Context EaseR;
    Helper_EaseInEaseOut_Context EaseG;
    Helper_EaseInEaseOut_Context EaseB;
} Smelter_Monochrome_Context;
static Smelter_Monochrome_Context context;
void smelter_monochrome_restart(Config_Mode_Monochrome *monochrome)
{
    //TODO: nothing
    context.EaseR.key = monochrome->color.R;
    context.EaseG.key = monochrome->color.G;
    context.EaseB.key = monochrome->color.B;

    context.EaseR.target = monochrome->color.R;
    context.EaseG.target = monochrome->color.G;
    context.EaseB.target = monochrome->color.B;
}

//可以直接访问其他出场配置
Efct_Stage smelter_monochrome_process(Config_Mode_Monochrome *monochrome)
{
    su16 ii = 0;

    context.EaseR.target = monochrome->color.R;
    context.EaseG.target = monochrome->color.G;
    context.EaseB.target = monochrome->color.B;
    helper_easeInEaseOutGenerate(&context.EaseR);
    helper_easeInEaseOutGenerate(&context.EaseG);
    helper_easeInEaseOutGenerate(&context.EaseB);
    for (ii = 0; ii < gCfgFactoryPtr->enabledDotNumber; ii++)
    {
        rgbStrip.colors[ii].R = context.EaseR.key;
        rgbStrip.colors[ii].G = context.EaseG.key;
        rgbStrip.colors[ii].B = context.EaseB.key;
    }
    return E_PROCESS;
}